-
Notifications
You must be signed in to change notification settings - Fork 134
feat(battery): add option to show charge percentage next to the icon #994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
feat(battery): add option to show charge percentage next to the icon #994
Conversation
Is it me or the y axis is not centered? |
I've discovered that this causes the panel to resize when it's in vertical mode, it's probably not something that should be happening due to a widget, will try to check it out later |
Looking forward to this |
I'm looking forward to this as well. @ilya-zlobintsev , is there anything I can do to help this pull request get merged? |
cosmic-applet-battery/src/app.rs
Outdated
.into(), | ||
PanelAnchor::Top | PanelAnchor::Bottom => Row::with_children(vec![btn, dot]) | ||
if is_horizontal { | ||
Row::with_children(vec![btn, dot]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤓 if Row::with_children
and Column::with_children
takes an impl IntoIterator
, then the vec!
macro isn't really needed, you could just pass the array itself
... 😅 sorry, besides that lgtm, looking forward to seeing this merged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, I changed it to from_vec
instead, since that's what with_children
does internally regardless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to use with_children
(since that's used basically everywhere applicable). Just remove the vec!
.
Closes #735
I haven't tested how the applet looks when the GPU selector is visible, as I don't currently have a hybrid graphics system, but it should be fine.